# -*- coding: utf-8 -*-
import math
def quadratic(a, b, c):
    delta = b ** 2 - 4 * a * c
    if delta < 0:
        print("此方程无解")
    elif delta == 0:
        return -b/2 * a
    else:
        delta_sqrt = math.sqrt(delta)
        x1 = (-b + delta_sqrt)/2 * a
        x2 = (-b - delta_sqrt)/2 * a

        return x1,x2

print(quadratic(1, 2, 1))